package dao.supplier.impl;

import dao.supplier.SupplierMapper;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import pojo.Supplier;

import java.util.List;

/**
 * @author 崔书健
 * @date 2024/7/22
 */
public class SupplierMapperImpl extends SqlSessionDaoSupport implements SupplierMapper {
    @Override
    public List<Supplier> getList(String supName) {
        return this.getSqlSession().selectList("dao.supplier.SupplierMapper.getList",supName);
    }

    @Override
    public int add(Supplier supplier) {
        return this.getSqlSession().getMapper(SupplierMapper.class).add(supplier);
    }

    @Override
    public int upd(Supplier supplier) {
        return this.getSqlSession().getMapper(SupplierMapper.class).upd(supplier);
    }

    @Override
    public int del(int id) {
        return this.getSqlSession().getMapper(SupplierMapper.class).del(id);
    }
}
